This invention relates generally to message queuing systems, and more particularly to the management of a session between two nodes in a message queuing system for transferring messages.
A message queuing system enables applications in a distributed processing network to send messages to, and receive messages from, other applications. A message may contain data in any format that is understood by both the sending and receiving applications. When the receiving application receives a request message, it processes the request according to the content of the message and, if required, sends a response message back to the original sending application. The sending and receiving applications may be on the same machine or on separate machines connected by a network. While in transit between the sending and receiving applications, the message queuing system keeps messages in holding areas called message queues. The message queues protect messages from being lost in transit and provide a place for an application to look for messages sent to it when it is ready.
When one application in the message queuing system sends a message to a receiving application on a remote computer, the message is often routed through a network of intermediate nodes in the message queuing system. Each node in the message route passes the message on to the next node by establishing a session therewith using a standard communication protocol. In some cases, the connection between the two nodes can fail, but the underlying communication protocol does not detect the connection failure and therefore cannot inform the message queuing system of the lost connection. To overcome this problem, an acknowledgment mechanism at the message queue (MQ) server level has to be developed for indicating whether the message transfer has been successful.
A conventional acknowledgment mechanism which sends an acknowledgment for each message or based on a maximum segment size is not adequate for managing the message transfer session for several reasons. The message queuing system is an asynchronous system in which the sending of a message or an acknowledgment does not coincide with the establishment of the session connection. As a result, the sending node in the session does not know when the acknowledgment may be received. Moreover, the same session between the two nodes is to be used for both sending and receiving messages by either node. The conventional acknowledgment mechanism is not adequate to prevent messages sent by one node from colliding with messages sent by the other node. Also, in terms of performance, the acknowledgment mechanism is unsatisfactory because the sending node cannot afford to stop and wait for an acknowledgment every time it sends a message using the session connection.
A message queuing system may include a large number of networked computers, which may go on and off at random intervals. To manage a large network, an administrator often needs a report of the operating status of the different computers in the network. This report does not have to be completely accurate, as it only has to provide a general indication of potential problems which will lead to a more in-depth examination of the possibly problematic computers.
In networks using a connection-based communication protocol, it is common to use a program which is commonly called xe2x80x9cpingxe2x80x9d to detect whether a remote computer is in operation. The ping program takes the address of a remote computer as a parameter and sends an echo request. It then waits for an echo response from that remote computer, and reports whether the response is received within a predefined timeout period. The lack of a response within the timeout period suggests that the remote computer may be out or service.
While the conventional ping approach works well with one computer, it does not allow the administrator to check a large group of computers at one time. Conventional ping applications support communications with a single computer per session. Expanding them to deal with multiple computers is difficult. In addition, the computer that initiates the ping request must also handle the echo response. It cannot redirect the response to another computer or process the response off-line. Moreover, the conventional ping operation only works when both computers are directly connected using a communication protocol. The ping operation will not work if the computers use different communication protocols or belong to separate networks.
In accordance with the invention, there is provided a method and system for managing transfer of message packets in a session between first and second nodes in a message queuing system that utilizes a session acknowledgment protocol to coordinate the two-way flow of message packet transmission. When a session is initiated, each of the two nodes specifies a session acknowledgment timeout period and a transmission window size. During the session, the first node transmits multiple message packets up to the window size set by the second node and stops to wait for a session acknowledgment from the second node. The second node sends a session acknowledgment when the session acknowledgment timeout period set by the first node has expired, or when the number of packets received but not yet acknowledged has reached the window size. The session acknowledgment may either be sent as a separate message packet or piggyback on a message packet sent by the second node to the first node. A window-size field in the session acknowledgment allows the receiving node to set a new window size to dynamically adjust the incoming data flow .
In accordance with another aspect of the invention, a xe2x80x9cmulti-pingxe2x80x9d mechanism implemented with asynchronous message delivery allows an administrator to check the operating status of multiple computers in the message queuing system. A ping-originator application sends echo request messages to a plurality of remote computers at one time. The echo response messages from the remote acomputers are sent to a response queue. An administration application reads the echo response messages and displays the operating status of the remote computers for viewing by the administrator.